// 个人中心
// var URL='http://api.holo.hk/web/goods/view';
host = window.location.host;
$(function(){
    $('.my-client').on('click',function(){
        window.location.href='../Personal/my client.html';
    });
    $('.top-pic').on('click',function(){
        window.location.href='../Personal/personal information.html';
    });
    $('.my-bonus').on('click',function(){
        window.location.href='../Personal/bonus.html';
    });
    $('.set').on('click',function(){
        window.location.href='../Personal/set.html';
    });
});
//加减购物车
$(document).ready(function(){
    $('.add').click(function(){
        var n=$(this).prev().val();
        var num=parseInt(n)+1;
        if (num==1){return;}
        $(this).prev().val(num);
    });
    $('.jian').click(function () {
        var n=$(this).next().val();
        var num=parseInt(n)-1;
        if(num==0){return;}
        $(this).next().val(num);
    });

    $('.search-box2').click(function(){
        $('.search-inp').css('width','300px');
        var search=$('.search-inp').val();
    });
});

function Order(){
    window.location.href='../Order/order-place.html';
}
function setting() {
    window.location.href='../Personal/set.html';
}


//产品
$(function(){
    $("#test li").click(function() {
        $(this).siblings('li').removeClass('active');
        $(this).addClass('active');
        $(this).siblings('li').find('span').removeClass('active3');
        $(this).find('span').addClass('active3');
        $('.brand-box').hide();
    });
});
$(function(){
    $("#test1 li").click(function() {
        $(this).siblings('li').removeClass('active');
        $(this).addClass('active');
        $(this).siblings('li').find('span').removeClass('active3');
        $(this).find('span').addClass('active3');
        $('.class-box').hide();

    });
});
$('.sales').click(function(){
    $('#background').hide();
    $('.brand-box').hide();
    $('.class-box').show();
    $('.class-b').removeClass('b-active');
    $('.brand').removeClass('b-active');
});
$('.brand').click(function () {
    if($('.brand-box').css('display')=='none'){
        $('.background').show();
        $('.brand-box').show();
        $('.class-box').hide();
        $('.brand').addClass('b-active');
        $('.class-b').removeClass('b-active');
    }else {
        $('.background').hide();
        $('.brand-box').hide();
        $('.class-box').show();
        $('.brand').removeClass('b-active');
    }
});
$('.class-b').click(function () {
    if($('.class-box').css('display')=='none'){
        $('.background').show();
        $('.brand-box').hide();
        $('.class-box').show();
        $('.class-b').addClass('b-active');
        $('.brand').removeClass('b-active');
    }else {
        $('.background').hide();
        $('.class-box').hide();
        $('.class-b').removeClass('b-active');

    }
});
$('.buy-cat').on('click',function () {
    window.location.href='shopping Cart.html';
});
$('.pro-mixi,.pic-box1').on('click',function () {
    window.location.href='product information.html';
});

function errorHide(){
    var e=setTimeout(function () {
        $("#error").hide();
        clearTimeout(e);
    },2000);
};
// 报销类型
$('.business11').click(function(){
    window.location.href='../Reimbursement/re-business.html';
});
$('.traffic11').click(function(){
    window.location.href='../Reimbursement/re-traffic.html';
});
$('.travel11').click(function(){
    window.location.href='../Reimbursement/re-travel.html';
});
$('.communication11').click(function(){
    window.location.href='../Reimbursement/re-communication.html';
});
$('.low').click(function(){
    window.location.href='../Reimbursement/re-low-value.html';
});
$('.other11').click(function(){
    window.location.href='../Reimbursement/re-other.html';
});
$('#test').find('li').each(function(){
    $(this).click(function(){
        $('.background').hide();
        $('.brand').removeClass('b-active');
    });
});
$('#test1').find('li').each(function(){
    $(this).click(function(){
        $('.background').hide();
        $('.null').show();
        $('.product-show').hide();
        $('body').css({'background':'#fff'});
        $('.class-b').removeClass('b-active');
    });
});
//刷新

$('.search').click(function(){
    $('.search-inp').css('width','300px');
    var search=$('.search-inp').val();
});

//订单
$(function(){
    $('.submitted-select').on('click',function(){
        $('.order-list-box1').hide();
        $('.submitted').show();
        $('.or-set').removeClass('order-select');
        $('.submitted-select').addClass('order-select');
        $('.submitted-select').attr('disabled',true);
    });
    $('.or-set').on('click',function(){
        $('.order-list-box1').show();
        $('.submitted').hide();
        $('.submitted-select').removeClass('order-select');
        $('.or-set').addClass('order-select');
        $('.or-set').attr('disabled',true);
    });
    $('.order-det').on('click',function(){
        window.location.href='../Order/order-details.html'
    });
});

$('.search-box2').click(function(){
    $('.search-inp').css('width','300px');
    var search=$('.search-inp').val();
});